<html>
<head><meta charset="utf-8"><title>Soundness issue that makes any type Copy · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Soundness.20issue.20that.20makes.20any.20type.20Copy.html">Soundness issue that makes any type Copy</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="210926340"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Soundness%20issue%20that%20makes%20any%20type%20Copy/near/210926340" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> HeroicKatora <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Soundness.20issue.20that.20makes.20any.20type.20Copy.html#210926340">(Sep 22 2020 at 20:22)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/27675#issuecomment-696956878">https://github.com/rust-lang/rust/issues/27675#issuecomment-696956878</a><br>
Resurrecting this issue since I found a novel way to exploit it that is quite a lot more unsound than avoid a lifetime bound.</p>



<a name="210926528"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Soundness%20issue%20that%20makes%20any%20type%20Copy/near/210926528" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Soundness.20issue.20that.20makes.20any.20type.20Copy.html#210926528">(Sep 22 2020 at 20:24)</a>:</h4>
<p>nice, that's a beautiful issue</p>



<a name="210926698"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Soundness%20issue%20that%20makes%20any%20type%20Copy/near/210926698" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Soundness.20issue.20that.20makes.20any.20type.20Copy.html#210926698">(Sep 22 2020 at 20:26)</a>:</h4>
<p>heh</p>



<a name="210926763"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Soundness%20issue%20that%20makes%20any%20type%20Copy/near/210926763" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Soundness.20issue.20that.20makes.20any.20type.20Copy.html#210926763">(Sep 22 2020 at 20:26)</a>:</h4>
<p>shouldn't this be fairly easy to fix, too?</p>



<a name="210928050"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Soundness%20issue%20that%20makes%20any%20type%20Copy/near/210928050" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> HeroicKatora <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Soundness.20issue.20that.20makes.20any.20type.20Copy.html#210928050">(Sep 22 2020 at 20:36)</a>:</h4>
<p>With feature <code>unsize</code> you can do arbitrary reference transmutes (transmute_copy).<br>
<a href="https://play.rust-lang.org/?version=nightly&amp;mode=debug&amp;edition=2018&amp;gist=a0bbee68770fbdb0f35332651a735d47">https://play.rust-lang.org/?version=nightly&amp;mode=debug&amp;edition=2018&amp;gist=a0bbee68770fbdb0f35332651a735d47</a></p>



<a name="210933749"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Soundness%20issue%20that%20makes%20any%20type%20Copy/near/210933749" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> HeroicKatora <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Soundness.20issue.20that.20makes.20any.20type.20Copy.html#210933749">(Sep 22 2020 at 21:31)</a>:</h4>
<p>Since any other marker trait is also affected:<br>
<a href="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=98af28c6df7f3eb66979a488a0984bf8">https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=98af28c6df7f3eb66979a488a0984bf8</a><br>
Sending a <code>&amp;Cell</code> across threads by abusing <code>dyn Any</code>. On stable</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>